{extends 'base/site2.html'}
{block name="page_header"}{include file="common/header.html" inline}{/block}
{block name="page_nav"}{include file="common/slide-nav.html" inline}{/block}
{block name="page_styles"}
<link rel="stylesheet" type="text/css" href="/css/mediation/user/editpassword.css" />
{/block}
{block name="page_scripts"}
<script type="text/javascript" src="/js/mediation/user/editpassword.min.js" init="mediation/user/editpassword"></script>
{/block}
{block name="page_section"}
    <div class="sessionPage clearfix">

        <div class="page-header">
          <div class="left">
              <span class="line"></span>
              <strong class="tit">修改密码</strong>
          </div>
        </div>

        <form class="form-horizontal col-lg-5 small-style" action="/user/editPassword" role="ajaxfrom" method="post" >
            <div class="form-group">
                <label for="oldpassword" class="col-sm-3 control-label">原密码</label>
                <div class="col-sm-9">
                    <input type="password" name="user[originalPassword]" class="form-control" {if !empty($smarty.get.mast_udpate)} value="PWD123456" {/if} id="oldpassword" data-valid="notempty" placeholder="请输入原密码">
                    <input type="hidden" name="user[id]" class="form-control"value="{$admin.id}">
                </div>
                <span class="error-tips col-sm-offset-3 col-sm-9"></span>
            </div>
            <div class="form-group">
                <label for="newpassword" class="col-sm-3 control-label">新密码</label>
                <div class="col-sm-9">
                    <input type="password" name="user[newPassword]" class="form-control" id="newpassword" data-valid="notempty|len:8:20|pwd" placeholder="请输入新密码">
                </div>
                <span class="error-tips col-sm-offset-3 col-sm-9"></span>
            </div>
            <div class="form-group">
                <label for="newpassword2" class="col-sm-3 control-label">确认新密码</label>
                <div class="col-sm-9">
                    <input type="password" name="user[newPassword2]" class="form-control" id="newpassword2" data-valid="notempty|len:8:20|pwd|equal:newpassword" placeholder="请再次输入新密码">
                </div>
                <span class="error-tips col-sm-offset-3 col-sm-9"></span>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-sm-9">
                    <button type="submit" class="btn btn-primary submit-btn">保存</button>
                    <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);">返回</button>
                </div>
            </div>
        </form>
    </div>
{/block}
